package com.snow.dayou;

import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.ApplicationContext;

@Slf4j
@SpringBootApplication(exclude = {DataSourceAutoConfiguration.class})
@EnableDiscoveryClient
@EnableFeignClients
public class MallApplication {

    public static void main(String[] args) {
        ApplicationContext context = SpringApplication.run(MallApplication.class, args);
        String serverPort = context.getEnvironment().getProperty("server.port");
        log.info("启动成功! Swagger2: http://127.0.0.1:" + serverPort + "/swagger-ui.html");
    }

}
